<extend name="Public/base" />
<block name="content">
<div id="content" style="min-width:800px;">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i
				class="icon-home"></i> 首页</a> <a href="#" class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		
		<a class="btn btn-info" href="{:U('Activity/activityThemeAdd')}">创建模板</a>
		<button class="confirm btn btn-success ajax-post " url="{:U('activityThemeChangeStatus?method=resumetheme')}" target-form="ids">启 用</button> 
		<button class="confirm btn btn-warning ajax-post " url="{:U('activityThemeChangeStatus?method=forbidtheme')}" target-form="ids">禁 用</button>
		<button class="confirm btn btn-danger ajax-post " url="{:U('activityThemeChangeStatus?method=deletetheme')}" target-form="ids">删 除</button>
		<div class="search-form fr cf">
			<div class="sleft">
				<span class="control-group">
					<select class="form-control" style="width: 200px;" name="activity_id">
						<option value=0>选择活动</option>
						<volist name="activity_list" id="vo">
							<option value='{$vo.activity_id}'>{$vo.activity_name|strip_tags}</option>
						</volist>
					</select>
				</span>
				<span class="control-group">
					<select class="form-control" style="width: 80px;" name="status">
						<option value=9>状态</option>
						<option value=1>启用</option>
						<option value=0>禁用</option>
					</select>
				</span>
				<input type="text" name="theme_name" class="search-input" value="{:strip_tags(I('theme_name'))}" placeholder="请输入模板名称" style="margin-bottom:0;"><button class="btn btn-info" id="search_button" url="{:U('Activity/activityTheme')}"><i class="icon-search icon-white"></i></button>
			</div>
		</div>
		
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content">
						<notempty name="_list">
							<table class="table table-bordered table-striped with-check">
								<thead>
									<tr>
										<th><input type="checkbox" /></th>
										<th nowrap="nowrap">编号</th>
										<th nowrap="nowrap">模块名称</th>
										<th nowrap="nowrap">隶属活动</th>
										<th nowrap="nowrap">模板类型</th>
										<th nowrap="nowrap">创建人</th>
										<th>展示/结束时间</th>
										<th>创建/修改时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="_list" id="vo">
										<tr>
											<td class="taskStatus"><input type="checkbox" value="{$vo.activity_theme_id}" name="id[]" class="ids"/></td>
											<td class="taskStatus">{$i}</td>
											<td class="taskStatus">{$vo.theme_name|htmlspecialchars|msubstr=###,0,10,'utf-8',false}</td>
											<td class="taskStatus">{$vo.activity_name|htmlspecialchars|msubstr=###,0,10,'utf-8',false}</td>
											<td class="taskStatus">{$vo.type|show_type}</td>
											<td class="taskStatus">{$vo.create_user_id|getuserName|htmlspecialchars}</td>
											<td nowrap="nowrap" class="taskStatus"><if condition="$vo['start_time'] neq 0">开始：<font color="green">{$vo.start_time|time_format}</font><br />结束：<font color="red">{$vo.end_time|time_format}</font></if></td>
											<td nowrap="nowrap" class="taskStatus">创建：{$vo.create_time|time_format}<br />修改：<font color="blue">{$vo.update_time|time_format}</font></td>
											<td class="taskStatus">
												<a href="{:U('Activity/activityThemeModule',array('activity_id'=>$vo['activity_id'],'activity_theme_id'=>$vo['activity_theme_id']))}"><i class="icon-external-link"></i> 模块</a>　
												<a href="{:U('Activity/activityThemeEdit',array('id'=>$vo['activity_theme_id']))}"><i class="icon-edit"></i> 编辑</a>　
												<neq name="vo['status']" value="0">
												<a href="{:U('Activity/activityThemeChangeStatus',array('id'=>$vo['activity_theme_id'],'method'=>'forbidtheme'))}" class="ajax-get"><i class="icon-lock"></i> 禁用</a>　
												</neq>
												<neq name="vo['status']" value="1">
													<a href="{:U('Activity/activityThemeChangeStatus',array('id'=>$vo['activity_theme_id'],'method'=>'resumetheme'))}"  class="ajax-get"><i class="icon-unlock"></i> 启用</a>　
												</neq>
												<a href="{:U('Activity/activityThemeChangeStatus',array('id'=>$vo['activity_theme_id'],'method'=>'deletetheme'))}" class="ajax-get confirm"><i class="icon-remove"></i> 删除</a>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
								{$_page}
							</div>
						<else/>
							<center>请根据搜索条件进行查询</center>
						</notempty>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function (){
	
	set_value("activity_id",'{:I('activity_id')}')
	if("{:I('status')}" != ""){
		set_value("status",'{:I('status')}')
	}else{
		set_value("status",'9')
	}
});
//导航高亮
highlight_subnav("{:U('Activity/activityTheme')}");
</script>
</block>